home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-03-29 | 37.3 KB | 1,413 lines |
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/lib/Changelo,v
- retrieving revision 1.105
- diff -c -r1.105 Changelo
- *** 1.105 1994/02/02 17:04:41
- --- Changelo 1994/03/29 22:12:39
- ***************
- *** 4639,4641 ****
- --- 4639,4945 ----
- -- adjust names for op_new etc
-
- ---------------------------- Patchlevel 97 ---------------------------
- +
- + == sync with mntlib 43
- + ***** libgcc2.c
- + ----------------------------
- + revision 42.3
- + date: 1994/02/10 11:38:42; author: entropy; state: Exp; lines: +1 -1
- + Only use XFmode extended real floating point if XFLOAT_ENABLE is defined.
- + ----------------------------
- + revision 42.2
- + date: 1994/01/28 16:30:08; author: schwab; state: Exp; lines: +1 -1
- + Don't try to use extended float mode (XFmode) with gcc before version 2.4.
- + Actually, this will also exclude gcc 2.4, since __GNUC_MINOR__ was
- + introduced just with gcc 2.5.
- + =============================================================================
- + ***** longlong.h
- + ----------------------------
- + revision 42.2
- + date: 1994/01/28 16:30:30; author: schwab; state: Exp; lines: +24 -25
- + Revert the last change, we don't need a register prefix.
- + =============================================================================
- + ***** include/assert.h
- + ----------------------------
- + revision 42.2
- + date: 1994/02/12 00:01:04; author: entropy; state: Exp; lines: +14 -14
- + Add back old statement-based assert macro, but now called __assert().
- + =============================================================================
- + ***** include/osbind.h
- + ----------------------------
- + revision 42.2
- + date: 1994/02/10 08:05:26; author: entropy; state: Exp; lines: +2 -2
- + Relax constraints from "r" to "g" on trap_14_wllwwwwwlw (used
- + by Flopfmt()).
- + =============================================================================
- +
- + ==end sync
- +
- + ==sync with mntlib 44
- + ***** a64l.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:27:40; author: entropy; state: Exp; lines: +0 -49
- + broke out functions
- + =============================================================================
- + ***** abort.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/27 13:16:42; author: entropy; state: Exp; lines: +9 -7
- + A possibly more ANSI/POSIX compliant abort().
- + =============================================================================
- + ***** abs.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:33:08; author: entropy; state: Exp; lines: +4 -9
- + broke out functions
- + =============================================================================
- + ***** atoi.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:33:32; author: entropy; state: Exp;
- + NEW file, broken out from atol.c
- + =============================================================================
- + ***** atol.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:34:10; author: entropy; state: Exp; lines: +2 -8
- + broke out functions
- + =============================================================================
- + ***** chmod.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:36:30; author: entropy; state: Exp; lines: +2 -24
- + broke out functions
- + =============================================================================
- + ***** chown.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 18:37:20; author: entropy; state: Exp;
- + NEW file, broken out from chmod.c
- + =============================================================================
- + ***** div.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:36:30; author: entropy; state: Exp; lines: +3 -32
- + broke out functions
- + =============================================================================
- + ***** fgetpos.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:50:12; author: entropy; state: Exp;
- + NEW file, broken out from fsetpos.c
- + =============================================================================
- + ***** fopen.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:36:30; author: entropy; state: Exp; lines: +20 -146
- + broke out functions
- + =============================================================================
- + ***** fopen_i.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:46:12; author: entropy; state: Exp;
- + NEW file, broken out from fopen.c
- + =============================================================================
- + ***** fputs.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:36:30; author: entropy; state: Exp; lines: +15 -26
- + broke out functions
- + =============================================================================
- + ***** freopen.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:46:12; author: entropy; state: Exp;
- + NEW file, broken out from fopen.c
- + =============================================================================
- + ***** fseek.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:36:30; author: entropy; state: Exp; lines: +5 -41
- + broke out functions
- + =============================================================================
- + ***** fsetpos.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:36:30; author: entropy; state: Exp; lines: +17 -33
- + broke out functions
- + =============================================================================
- + ***** ftell.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:49:16; author: entropy; state: Exp;
- + NEW file, broken out from fseek.c
- + =============================================================================
- + ***** getegid.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:52:34; author: entropy; state: Exp;
- + NEW file, broken out from getuid.c
- + =============================================================================
- + ***** geteuid.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:52:34; author: entropy; state: Exp;
- + NEW file, broken out from getuid.c
- + =============================================================================
- + ***** getgid.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:52:34; author: entropy; state: Exp;
- + NEW file, broken out from getuid.c
- + =============================================================================
- + ***** getpid.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:36:30; author: entropy; state: Exp; lines: +5 -2
- + broke out functions
- + =============================================================================
- + ***** getppid.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:50:12; author: entropy; state: Exp;
- + NEW file, broken out from getpid.c
- + =============================================================================
- + ***** getuid.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:36:30; author: entropy; state: Exp; lines: +5 -63
- + broke out functions
- + =============================================================================
- + ***** l64a.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:27:04; author: entropy; state: Exp;
- + NEW file, broke out from a64l.c.
- + =============================================================================
- + ***** labs.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:28:50; author: entropy; state: Exp;
- + NEW file, formerly in abs.c
- + =============================================================================
- + ***** ldiv.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:42:52; author: entropy; state: Exp;
- + NEW file, broken out from div.c
- + =============================================================================
- + ***** lib.h
- + ----------------------------
- + revision 43.3
- + date: 1994/02/28 14:03:04; author: entropy; state: Exp; lines: +12 -0
- + add some prototypes
- + ----------------------------
- + revision 43.2
- + date: 1994/02/27 11:51:30; author: entropy; state: Exp; lines: +1 -0
- + add _enoent() prototype.
- + =============================================================================
- + ***** puts.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:47:38; author: entropy; state: Exp;
- + NEW file, broken out from fputs.c
- + =============================================================================
- + ***** regexp.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/24 16:41:16; author: schwab; state: Exp; lines: +1 -0
- + regcomp fails to compile "(a+|b)*" (from libtest/tregex.c). The bug
- + is an uninitialized byte in reginsert.
- + =============================================================================
- + ***** rewind.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:49:16; author: entropy; state: Exp;
- + NEW file, broken out from fseek.c
- + =============================================================================
- + ***** setegid.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:52:34; author: entropy; state: Exp;
- + NEW file, broken out from getuid.c
- + =============================================================================
- + ***** seteuid.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:52:34; author: entropy; state: Exp;
- + NEW file, broken out from getuid.c
- + =============================================================================
- + ***** setgid.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:52:34; author: entropy; state: Exp;
- + NEW file, broken out from getuid.c
- + =============================================================================
- + ***** setregid.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:52:34; author: entropy; state: Exp;
- + NEW file, broken out from getuid.c
- + =============================================================================
- + ***** setreuid.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:52:34; author: entropy; state: Exp;
- + NEW file, broken out from getuid.c
- + =============================================================================
- + ***** setuid.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:52:34; author: entropy; state: Exp;
- + NEW file, broken out from getuid.c
- + =============================================================================
- + ***** uidgid.c
- + ----------------------------
- + revision 43.2
- + date: 1994/02/28 13:52:34; author: entropy; state: Exp;
- + NEW file, broken out from getuid.c
- + =============================================================================
- + ***** include/PatchLev.h
- + ----------------------------
- + revision 43.2
- + date: 1994/02/15 20:33:52; author: entropy; state: Exp; lines: +1 -1
- + -
- + =============================================================================
- + ***** include/ioctl.h
- + ----------------------------
- + revision 43.5
- + date: 1994/02/27 09:42:40; author: entropy; state: Exp; lines: +13 -8
- + Add some more TIOCM_* definitions
- + ----------------------------
- + revision 43.4
- + date: 1994/02/21 19:31:36; author: entropy; state: Exp; lines: +29 -0
- + Catch up with MiNT's file.h: Add cursor ioctl's and some missing
- + process ioctl's.
- + ----------------------------
- + revision 43.3
- + date: 1994/02/21 19:20:24; author: entropy; state: Exp; lines: +9 -0
- + Add TIOCMGET (faked) and related bitmasks.
- + ----------------------------
- + revision 43.2
- + date: 1994/02/19 14:25:04; author: entropy; state: Exp; lines: +11 -9
- + Added TIOCSDTR, TIOCCDTR and cleaned up a bit.
- + =============================================================================
- + ***** include/mintbind.h
- + ----------------------------
- + revision 43.2
- + date: 1994/02/26 08:45:42; author: entropy; state: Exp; lines: +8 -0
- + Add new MiNT system calls: Tmalarm(), Psigintr(), Suptime().
- + All are unofficial and subject to change.
- + =============================================================================
- + ***** include/ostruct.h
- + ----------------------------
- + revision 43.2
- + date: 1994/02/22 17:47:58; author: entropy; state: Exp; lines: +4 -0
- + Complete the _PARAM structure used with Initmous().
- + =============================================================================
- +
- + New files: atoi.c chown.c fgetpos.c fopen_i.c freopen.c ftell.c getegid.c
- + geteuid.c getgid.c getppid.c l64a.c labs.c ldiv.c puts.c rewind.c setegid.c
- + seteuid.c setgid.c setregid.c setreuid.c setuid.c uidgid.c
- +
- + == end sync
- +
- + ---------------------------- Patchlevel 98 ---------------------------
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/lib/PatchLev.h,v
- retrieving revision 1.73
- diff -c -r1.73 PatchLev.h
- *** 1.73 1994/02/02 17:04:45
- --- PatchLev.h 1994/03/29 22:12:45
- ***************
- *** 1,5 ****
-
- ! #define PatchLevel "97"
-
- /*
- *
- --- 1,5 ----
-
- ! #define PatchLevel "98"
-
- /*
- *
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/lib/mincl,v
- retrieving revision 1.35
- diff -c -r1.35 mincl
- *** 1.35 1994/02/02 17:04:50
- --- mincl 1994/03/18 17:24:30
- ***************
- *** 21,45 ****
- bblink.o defmode.o
- #
- # ANSI stuff + support
- ! ANSI = atol.o atof.o abort.o bsearch.o \
- calloc.o clock.o ctime.o ctype.o difftime.o \
- ! fopen.o fclose.o fdopen.o fflush.o fgetc.o fgets.o \
- ! fputc.o fputs.o fread.o fwrite.o fseek.o fsetpos.o \
- ! fprintf.o vfprintf.o printf.o vprintf.o eprintf.o sprintf.o \
- fscanf.o scanf.o sscanf.o \
- getenv.o putenv.o gets.o getw.o localtim.o \
- malloc.o qsort.o raise.o rand.o realloc.o \
- setbuf.o setvbuf.o \
- setlocal.o strftime.o strtol.o system.o \
- tmpnam.o tmpfile.o \
- ! ltoa.o main.o doprnt.o div.o \
- strtoul.o fungetc.o filbuf.o getbuf.o toxxx.o \
- ! wcmb.o wcscat.o wcscmp.o wcscpy.o wcslen.o wnull.o
- !
- #
- # other portable stuff
- PORT = a64l.o alphasor.o abs.o buffindf.o catch.o dirent.o findfile.o ftw.o \
- ! getpw.o getlogin.o getopt.o getpass.o ident.o mktemp.o putpwent.o \
- scandir.o strlwr.o strrev.o strupr.o regexp.o regsup.o textio.o \
- random.o obstack.o il.o ic.o iw.o ig.o ip.o frwbin.o ctermid.o \
- cuserid.o ffs.o nlist.o
- --- 21,45 ----
- bblink.o defmode.o
- #
- # ANSI stuff + support
- ! ANSI = atoi.c atol.o atof.o abort.o bsearch.o \
- calloc.o clock.o ctime.o ctype.o difftime.o \
- ! fopen.o fopen_i.o fclose.o fdopen.o fflush.o fgetc.o fgetpos.o fgets.o \
- ! fputc.o fputs.o fread.o freopen.o fwrite.o fseek.o fsetpos.o \
- ! fprintf.o ftell.o vfprintf.o printf.o vprintf.o eprintf.o sprintf.o \
- fscanf.o scanf.o sscanf.o \
- getenv.o putenv.o gets.o getw.o localtim.o \
- malloc.o qsort.o raise.o rand.o realloc.o \
- setbuf.o setvbuf.o \
- setlocal.o strftime.o strtol.o system.o \
- tmpnam.o tmpfile.o \
- ! ltoa.o main.o doprnt.o div.o ldiv.o \
- strtoul.o fungetc.o filbuf.o getbuf.o toxxx.o \
- ! wcmb.o wcscat.o wcscmp.o wcscpy.o wcslen.o wnull.o \
- ! puts.o rewind.o
- #
- # other portable stuff
- PORT = a64l.o alphasor.o abs.o buffindf.o catch.o dirent.o findfile.o ftw.o \
- ! getpw.o getlogin.o getopt.o getpass.o ident.o labs.o l64a.o mktemp.o putpwent.o \
- scandir.o strlwr.o strrev.o strupr.o regexp.o regsup.o textio.o \
- random.o obstack.o il.o ic.o iw.o ig.o ip.o frwbin.o ctermid.o \
- cuserid.o ffs.o nlist.o
- ***************
- *** 54,67 ****
- #
- # stuff to fake unix system calls
-
- ! UNIX= access.o chdir.o chmod.o close.o console.o device.o dup.o exec.o fcntl.o \
- fhandle.o fork.o getcwd.o getpage.o getpid.o getuid.o grp.o ioctl.o isatty.o \
- link.o lseek.o mkdir.o mkfifo.o null.o open.o perror.o pgrp.o pipe.o popen.o psignal.o \
- read.o rename.o rmdir.o \
- sbrk.o sgtty.o signal.o siglist.o sleep.o spawnve.o spawnvp.o stat.o \
- symdir.o symlink.o tchars.o time.o timeoday.o times.o \
- ! unlink.o unx2dos.o utime.o vfork.o write.o
- !
- #
- # stuff for integer only scan/printf
-
- --- 54,68 ----
- #
- # stuff to fake unix system calls
-
- ! UNIX= access.o chdir.o chmod.o chown.c close.o console.o device.o dup.o exec.o fcntl.o \
- fhandle.o fork.o getcwd.o getpage.o getpid.o getuid.o grp.o ioctl.o isatty.o \
- link.o lseek.o mkdir.o mkfifo.o null.o open.o perror.o pgrp.o pipe.o popen.o psignal.o \
- read.o rename.o rmdir.o \
- sbrk.o sgtty.o signal.o siglist.o sleep.o spawnve.o spawnvp.o stat.o \
- symdir.o symlink.o tchars.o time.o timeoday.o times.o \
- ! unlink.o unx2dos.o utime.o vfork.o write.o \
- ! getegid.o geteuid.o getgid.o getppid.o setegid.o seteuid.o \
- ! setgid.o setregid.o setreuid.o setuid.o uidgid.o
- #
- # stuff for integer only scan/printf
-
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/a64l.c,v
- retrieving revision 1.2
- diff -c -r1.2 a64l.c
- *** 1.2 1993/07/10 16:36:33
- --- a64l.c 1994/03/17 21:23:59
- ***************
- *** 66,72 ****
-
- /* Local function prototypes */
- static int a64i __PROTO((char c)); /* base-64 char to int, -1 on error */
- - static char i64a __PROTO((int i)); /* integer to base-64 char, 0x7F on error */
-
- /* base-64 char to int, -1 on error */
- static int a64i(c)
- --- 66,71 ----
- ***************
- *** 112,162 ****
- return(retval);
- } /* End of a64l() */
-
- - /* integer to base-64 char, 0x7F on error */
- - static char i64a(i)
- - int i;
- - {
- - char retval = (char)i;
- -
- - if ((i < 0) || (i > 63))
- - {
- - errno = EBADARG;
- - return(0x7F);
- - }
- - retval += '.';
- - if (i > 11)
- - retval += 'A' - '9' - 1;
- - if (i > 37)
- - retval += 'a' - 'Z' - 1;
- - return(retval);
- - } /* End of i64a() */
- -
- - /* long to base-64 string */
- - char *l64a(l)
- - long l;
- - {
- - static char retval[7];
- - char buffer[7], *ptr1 = buffer, *ptr2 = retval;
- - int counter = 0;
- -
- - if (l < 0)
- - {
- - errno = EBADARG;
- - return("");
- - }
- - if (l == 0)
- - return("");
- - while ((counter++ < 6) && (l > 0))
- - {
- - char val;
- -
- - if ((val = i64a((char)(l & 0x3F))) == 0x7F)
- - return(""); /* errno was set by i64a() */
- - *ptr1++ = val;
- - l >>= 6;
- - }
- - while (ptr1 > buffer)
- - *ptr2++ = *(--ptr1);
- - *ptr2 = 0x00;
- - return(retval);
- - } /* End of l64a() */
- --- 111,113 ----
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/abort.c,v
- retrieving revision 1.7
- diff -c -r1.7 abort.c
- *** 1.7 1993/11/17 17:15:45
- --- abort.c 1994/03/17 21:24:00
- ***************
- *** 1,4 ****
- ! /* ERS */
-
- #include <signal.h>
- #include <stdlib.h>
- --- 1,4 ----
- ! /* by ERS, modified by entropy */
-
- #include <signal.h>
- #include <stdlib.h>
- ***************
- *** 17,31 ****
- {
- #ifdef __MINT__
- if (__mint)
- (void) Pkill(Pgetpid(), SIGABRT);
- ! #if 0
- ! /* Do not do this because it violates POSIX (raise() and
- ! kill() are available for the user unless <signal.h> is
- ! included in user's source). Fix later.
- ! */
- else
- raise(SIGABRT);
- - #endif
- _fclose_all_files();
- _exit(127);
- #else
- --- 17,33 ----
- {
- #ifdef __MINT__
- if (__mint)
- + {
- (void) Pkill(Pgetpid(), SIGABRT);
- ! /* process still alive, maybe SIGABRT was blocked */
- ! (void) Psigsetmask(Psigblock(0) & ~(sigmask(SIGABRT)));
- ! /* process still alive, maybe SIGABRT was ignored */
- ! /* is this correct if user SIGABRT handler returns? */
- ! (void) Psignal(SIGABRT, (long) SIG_DFL);
- ! (void) Pkill(Pgetpid(), SIGABRT);
- ! }
- else
- raise(SIGABRT);
- _fclose_all_files();
- _exit(127);
- #else
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/abs.c,v
- retrieving revision 1.3
- diff -c -r1.3 abs.c
- *** 1.3 1994/02/02 19:01:56
- --- abs.c 1994/03/17 21:24:00
- ***************
- *** 4,17 ****
- #ifdef abs
- #undef abs
- #endif
- - #ifdef labs
- - #undef labs
- - #endif
-
- int abs(x)
- ! int x;
- ! { return x < 0 ? -x : x; }
- !
- ! long labs(x)
- ! long x;
- ! { return x < 0 ? -x : x; }
- --- 4,12 ----
- #ifdef abs
- #undef abs
- #endif
-
- int abs(x)
- ! int x;
- ! {
- ! return x < 0 ? -x : x;
- ! }
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/atol.c,v
- retrieving revision 1.4
- diff -c -r1.4 atol.c
- *** 1.4 1992/06/24 15:32:04
- --- atol.c 1994/03/17 21:24:01
- ***************
- *** 6,20 ****
-
- __EXTERN long strtol __PROTO((const char *, char **, int));
-
- ! int atoi(str)
- const char *str;
- - {
- - assert ((str != NULL));
- - return (int) strtol(str, (char **)0, 10);
- - }
- -
- - long atol(str)
- - const char *str;
- {
- assert ((str != NULL));
- return strtol(str, (char **)0, 10);
- --- 6,14 ----
-
- __EXTERN long strtol __PROTO((const char *, char **, int));
-
- ! long
- ! atol(str)
- const char *str;
- {
- assert ((str != NULL));
- return strtol(str, (char **)0, 10);
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/chmod.c,v
- retrieving revision 1.10
- diff -c -r1.10 chmod.c
- *** 1.10 1993/10/26 23:52:20
- --- chmod.c 1994/03/17 21:24:01
- ***************
- *** 1,5 ****
- /* chmod -- change the permissions of a file */
- - /* chown -- change the owner and group of a file */
- /* written by Eric R. Smith and placed in the public domain */
-
- #include <types.h>
- --- 1,4 ----
- ***************
- *** 13,19 ****
-
- extern int __mint;
-
- ! int chmod(_path, mode)
- const char *_path;
- int mode;
- {
- --- 12,19 ----
-
- extern int __mint;
-
- ! int
- ! chmod(_path, mode)
- const char *_path;
- int mode;
- {
- ***************
- *** 60,84 ****
- return 0;
- }
-
- - /*
- - * chown: this is faked if MiNT is not running
- - */
- -
- - int chown(_name, uid, gid)
- - const char *_name;
- - int uid, gid;
- - {
- - int r;
- - char name[PATH_MAX];
- -
- - if (__mint >= 9) {
- - (void)_unx2dos(_name, name);
- - r = (int)Fchown(name, uid, gid);
- - if (r && (r != -EINVAL)) {
- - errno = -r;
- - return -1;
- - }
- - return 0;
- - }
- - return 0;
- - }
- --- 60,62 ----
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/div.c,v
- retrieving revision 1.5
- diff -c -r1.5 div.c
- *** 1.5 1993/10/26 23:52:23
- --- div.c 1994/03/17 21:24:02
- ***************
- *** 1,5 ****
- /*
- ! * div and ldiv
- * this one should be compat with -fpcc-struct-return
- *
- * ++jrb bammi@dsrgsun.ces.cwru.edu
- --- 1,5 ----
- /*
- ! * div
- * this one should be compat with -fpcc-struct-return
- *
- * ++jrb bammi@dsrgsun.ces.cwru.edu
- ***************
- *** 11,17 ****
- long __divsi3(long, long); /* returns: quot in d0.l remainder in d1.l */
-
- #ifdef __MSHORT__
- ! div_t div(int num, int denom)
- {
- div_t result;
-
- --- 11,18 ----
- long __divsi3(long, long); /* returns: quot in d0.l remainder in d1.l */
-
- #ifdef __MSHORT__
- ! div_t
- ! div(int num, int denom)
- {
- div_t result;
-
- ***************
- *** 29,52 ****
- #else /* !__MSHORT__ */
- __asm__(".stabs \"_div\",5,0,0,_ldiv");
- #endif
- -
- - ldiv_t ldiv(long num, long denom)
- - {
- - ldiv_t result;
- -
- - __asm__ volatile("\
- - movl %3,sp@-
- - movl %2,sp@-
- - jsr ___divsi3
- - addqw #8,sp
- - movl d0,%0
- - movl d1,%1"
- - : "=g"(result.quot), "=g"(result.rem)
- - : "r"(num), "r"(denom)
- - ); /* compiler dependency, dont tell gcc about d0,d1 clobb */
- - return result;
- - }
- -
- #else /* !__GNUC__ */
-
- div_t
- --- 30,35 ----
- ***************
- *** 55,72 ****
- {
- div_t res;
-
- - res.quot = num / denom;
- - res.rem = num % denom;
- -
- - return res;
- - }
- -
- - ldiv_t
- - ldiv(num, denom)
- - long num, denom;
- - {
- - ldiv_t res;
- -
- res.quot = num / denom;
- res.rem = num % denom;
-
- --- 38,43 ----
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/fopen.c,v
- retrieving revision 1.22
- diff -c -r1.22 fopen.c
- *** 1.22 1994/02/02 19:02:03
- --- fopen.c 1994/03/17 21:24:02
- ***************
- *** 5,160 ****
- #include <fcntl.h>
- #include <unistd.h>
- #include <errno.h>
-
- __EXTERN void _getbuf __PROTO((FILE *));
- - static FILE *_fopen __PROTO((const char *, const char *, FILE *));
-
- ! extern int __mint;
- !
- ! /* lowest character device handle # */
- ! #define LAST_DEVICE __SMALLEST_VALID_HANDLE
- !
- ! extern int __default_mode__;
- !
- ! static FILE *_fopen(filename, mode, fp)
- ! const char *filename;
- ! const char *mode;
- ! FILE *fp;
- ! /*
- ! * INTERNAL FUNCTION. Attempt to open <filename> in the given
- ! * <mode> and attach it to the stream <fp>
- ! */
- ! {
- ! register int h, i, iomode = 0, f = __default_mode__;
- !
- ! while(*mode)
- ! {
- ! switch(*mode++)
- ! {
- ! case 'r':
- ! f |= _IOREAD;
- ! break;
- ! case 'w':
- ! f |= _IOWRT;
- ! iomode |= (O_CREAT | O_TRUNC);
- ! break;
- ! case 'a':
- ! f |= _IOWRT;
- ! iomode |= (O_CREAT | O_APPEND);
- ! break;
- ! case '+':
- ! f &= ~(_IOREAD | _IOWRT);
- ! f |= _IORW;
- ! break;
- ! case 'b':
- ! f |= _IOBIN;
- ! break;
- ! case 't':
- ! f &= ~_IOBIN;
- ! break;
- ! default:
- ! return(NULL);
- ! }
- ! }
- ! if((i = (f & (_IORW | _IOREAD | _IOWRT))) == 0)
- ! return(NULL);
- ! else if(i == _IOREAD)
- ! iomode |= O_RDONLY;
- ! else if(i == _IOWRT)
- ! iomode |= O_WRONLY;
- ! else
- ! iomode |= O_RDWR;
- ! iomode |= O_NOCTTY;
- ! h = open(filename, iomode, 0666);
- ! if(h < __SMALLEST_VALID_HANDLE)
- ! {
- ! return(NULL); /* file open/create error */
- ! }
- ! if(isatty(h))
- ! f |= __mint ? (_IODEV | _IONBF| _IOBIN) : (_IODEV | _IONBF);
- ! else
- ! f |= _IOFBF;
- ! fp->_file = h; /* file handle */
- ! fp->_flag = f; /* file status flags */
- ! if (iomode & O_APPEND)
- ! (void) fseek(fp, 0L, SEEK_END);
- !
- ! return(fp);
- ! }
- !
- ! FILE *fopen(filename, mode)
- ! const char *filename, *mode;
- ! {
- ! register int i;
- ! register FILE *fp = NULL;
- !
- ! for(i=0; (!fp && (i < _NFILE)); ++i)
- ! if(!(_iob[i]._flag & (_IORW | _IOREAD | _IOWRT)))
- ! fp = &_iob[i]; /* empty slot */
- ! if(fp != NULL)
- ! {
- ! if(_fopen(filename, mode, fp) == NULL)
- ! return NULL;
- ! _getbuf(fp);
- ! return fp;
- ! }
- ! else
- ! {
- ! errno = EMFILE;
- ! return NULL;
- ! }
- ! }
- !
- ! /*
- ! * re-coded, foobared code deleted
- ! *
- ! * ++jrb
- ! */
- ! FILE *freopen(filename, mode, fp)
- const char *filename, *mode;
- - FILE *fp;
- {
- ! unsigned int f;
- !
- ! if(fp == NULL) return NULL;
- !
- ! f = fp->_flag;
- ! if((f & (_IORW | _IOREAD | _IOWRT)) != 0)
- ! { /* file not closed, close it */
- ! #if 0
- ! if(fflush(fp) != 0) return NULL; /* flush err */
- ! if(close(fp->_file) != 0) return NULL; /* close err */
- ! #else
- ! fflush(fp); /* ANSI says ignore errors */
- ! if (__mint || !(f & _IODEV)) /* leave tty's alone */
- ! close(fp->_file);
- ! #endif
- ! }
- ! /* save buffer discipline and setbuf settings, and _IOWRT just for
- ! determinining line buffering after the next _fopen */
- ! f &= (_IOFBF | _IOLBF | _IONBF | _IOMYBUF | _IOWRT);
- !
- ! /* open the new file according to mode */
- ! if((fp = _fopen(filename, mode, fp)) == NULL)
- ! return NULL;
- ! if(fp->_flag & _IODEV)
- ! { /* we are re-opening to a tty */
- ! if((f & _IOFBF) && (f & _IOWRT) && (f & _IOMYBUF))
- ! { /* was a FBF & WRT & !setvbuff'ed */
- ! /* reset to line buffering */
- ! f &= ~_IOFBF;
- ! f |= _IOLBF;
- ! }
- ! }
- ! f &= ~_IOWRT; /* get rid of saved _IOWRT flag */
- !
- ! /* put buffering and discipline flags in new fp->_flag */
- ! fp->_flag &= ~(_IONBF | _IOLBF | _IOFBF | _IOMYBUF);
- ! fp->_flag |= f;
- !
- ! if (fp->_base == NULL)
- ! /* get new buffer if file was closed */
- ! _getbuf (fp);
-
- return fp;
- ! }
- --- 5,34 ----
- #include <fcntl.h>
- #include <unistd.h>
- #include <errno.h>
- + #include "lib.h"
-
- __EXTERN void _getbuf __PROTO((FILE *));
-
- ! FILE *
- ! fopen(filename, mode)
- const char *filename, *mode;
- {
- ! register int i;
- ! register FILE *fp = NULL;
-
- + for (i=0; (!fp && (i < _NFILE)); ++i)
- + if (!(_iob[i]._flag & (_IORW | _IOREAD | _IOWRT)))
- + fp = &_iob[i]; /* empty slot */
- + if (fp != NULL)
- + {
- + if (_fopen_i(filename, mode, fp) == NULL)
- + return NULL;
- + _getbuf(fp);
- return fp;
- ! }
- ! else
- ! {
- ! errno = EMFILE;
- ! return NULL;
- ! }
- ! }
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/fputs.c,v
- retrieving revision 1.5
- diff -c -r1.5 fputs.c
- *** 1.5 1993/10/26 23:52:34
- --- fputs.c 1994/03/17 21:24:03
- ***************
- *** 4,33 ****
- #include <stddef.h>
- #include <assert.h>
-
- ! int fputs(data, fp)
- ! register const char *data;
- ! register FILE *fp;
- ! {
- ! register int n = 0;
-
- ! assert((data != NULL));
- ! while(*data)
- ! {
- ! if(fputc(*data++, fp) == EOF)
- ! return(EOF);
- ! ++n;
- ! }
- ! return(n);
- ! }
- !
- ! int puts(data)
- ! const char *data;
- ! {
- ! register int n;
- !
- ! assert((data != NULL));
- ! if(((n = fputs(data, stdout)) == EOF)
- ! || (fputc('\n', stdout) == EOF))
- ! return(EOF);
- ! return(++n);
- ! }
- --- 4,22 ----
- #include <stddef.h>
- #include <assert.h>
-
- ! int
- ! fputs(data, fp)
- ! register const char *data;
- ! register FILE *fp;
- ! {
- ! register int n = 0;
-
- ! assert((data != NULL));
- ! while (*data)
- ! {
- ! if (fputc(*data++, fp) == EOF)
- ! return (EOF);
- ! ++n;
- ! }
- ! return (n);
- ! }
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/fseek.c,v
- retrieving revision 1.7
- diff -c -r1.7 fseek.c
- *** 1.7 1992/09/14 14:56:40
- --- fseek.c 1994/03/17 21:24:03
- ***************
- *** 5,52 ****
- #include <stdio.h>
- #include <unistd.h>
-
- ! long ftell(fp)
- ! FILE *fp;
- {
- - long rv, count = fp->_cnt, adjust = 0;
- - unsigned int f = fp->_flag;
- -
- - if( ((f & _IOREAD) && (!(f & _IOBIN))) ||
- - (count == 0) ||
- - (f & _IONBF) )
- - {
- - fflush(fp);
- - rv = lseek(fp->_file, 0L, SEEK_CUR);
- - }
- - else
- - {
- - if(f & _IOREAD)
- - adjust = -count;
- - else if(f & (_IOWRT | _IORW))
- - {
- - if(f & _IOWRT)
- - adjust = count;
- - }
- - else return -1L;
- -
- - rv = lseek(fp->_file, 0L, SEEK_CUR);
- - }
- - return (rv < 0) ? -1L : rv + adjust;
- - }
- -
- - void rewind(fp)
- - register FILE *fp;
- - {
- - fflush(fp);
- - (void) lseek(fp->_file, 0L, SEEK_SET);
- - fp->_flag &= ~(_IOEOF|_IOERR);
- - }
- -
- - int fseek(fp, offset, origin)
- - FILE *fp;
- - long offset;
- - int origin;
- - {
- long pos, count;
- unsigned int f;
- int rv;
- --- 5,16 ----
- #include <stdio.h>
- #include <unistd.h>
-
- ! int
- ! fseek(fp, offset, origin)
- ! FILE *fp;
- ! long offset;
- ! int origin;
- {
- long pos, count;
- unsigned int f;
- int rv;
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/fsetpos.c,v
- retrieving revision 1.2
- diff -c -r1.2 fsetpos.c
- *** 1.2 1989/03/22 17:40:53
- --- fsetpos.c 1994/03/17 21:24:04
- ***************
- *** 2,38 ****
-
- #include <stdio.h>
-
- ! #define ERROR -1
-
- ! int fgetpos(fp, pos)
- ! FILE *fp;
- ! fpos_t *pos;
- ! {
- ! register long rv;
- !
- ! rv = ftell(fp);
- ! if((rv >= 0) && pos)
- ! {
- ! *pos = rv;
- ! return(0);
- ! }
- ! return(ERROR);
- ! }
- !
- ! int fsetpos(fp, pos)
- ! FILE *fp;
- ! fpos_t *pos;
- ! {
- ! register long rv;
- !
- ! if(pos)
- ! {
- ! rv = fseek(fp, *pos, SEEK_SET);
- ! if(rv >= 0)
- ! {
- ! fp->_flag &= ~(_IOEOF|_IOERR);
- ! return(0);
- ! }
- ! }
- ! return(ERROR);
- ! }
- --- 2,22 ----
-
- #include <stdio.h>
-
- ! int
- ! fsetpos(fp, pos)
- ! FILE *fp;
- ! fpos_t *pos;
- ! {
- ! register long rv;
-
- ! if (pos)
- ! {
- ! rv = fseek(fp, *pos, SEEK_SET);
- ! if (rv >= 0)
- ! {
- ! fp->_flag &= ~(_IOEOF|_IOERR);
- ! return (0);
- ! }
- ! }
- ! return (-1);
- ! }
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/getpid.c,v
- retrieving revision 1.7
- diff -c -r1.7 getpid.c
- *** 1.7 1993/03/01 17:34:31
- --- getpid.c 1994/03/17 21:24:05
- ***************
- *** 5,9 ****
-
- extern int __mint;
-
- ! int getpid() { return __mint ? Pgetpid() : (int) ( ((long)_base) >> 8 ); }
- ! int getppid() { return __mint ? Pgetppid() : (int) (((long)(_base->p_parent)) >> 8); }
- --- 5,12 ----
-
- extern int __mint;
-
- ! int
- ! getpid()
- ! {
- ! return __mint ? Pgetpid() : (int) ( ((long)_base) >> 8 );
- ! }
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/getuid.c,v
- retrieving revision 1.11
- diff -c -r1.11 getuid.c
- *** 1.11 1993/06/04 19:55:49
- --- getuid.c 1994/03/17 21:24:06
- ***************
- *** 1,71 ****
- ! #ifdef __TURBOC__
- ! #include <sys\types.h>
- ! #else
- ! #include <sys/types.h>
- ! #endif
- #include <unistd.h>
- #include <osbind.h>
- #include <mintbind.h>
- - #include <errno.h>
-
- extern int __mint;
-
- ! static int __uid = 0, __gid = 0;
- !
- ! uid_t getuid() { return __mint ? Pgetuid() : __uid; }
- ! gid_t getgid() { return __mint ? Pgetgid() : __gid; }
- !
- ! uid_t geteuid()
- ! { return __mint >= 95 ? Pgeteuid() : getuid(); }
- !
- ! gid_t getegid()
- ! { return __mint >= 95 ? Pgetegid() : getgid(); }
- !
- ! int setuid(x)
- ! int x;
- ! {
- ! long r;
- !
- ! if (__mint) {
- ! r = Psetuid(x);
- ! if (r < 0) {
- ! errno = (int) -r;
- ! return -1;
- ! }
- ! return 0;
- ! }
- ! __uid = x;
- ! return 0;
- ! }
- !
- ! int setgid(x)
- ! int x;
- {
- ! long r;
- !
- ! if (__mint) {
- ! r = Psetgid(x);
- ! if (r < 0) {
- ! errno = (int) -r;
- ! return -1;
- ! }
- ! return 0;
- ! }
- ! __gid = x;
- ! return 0;
- ! }
- !
- ! int setreuid(ruid,euid)
- ! int ruid, euid;
- ! {
- ! return setuid(euid);
- }
- -
- - int setregid(rgid,egid)
- - int rgid, egid;
- - {
- - return setgid(egid);
- - }
- -
- - int seteuid(x) int x; { return setuid(x); }
- - int setegid(x) int x; { return setgid(x); }
- --- 1,13 ----
- ! #include <types.h>
- #include <unistd.h>
- #include <osbind.h>
- #include <mintbind.h>
-
- extern int __mint;
- + extern uid_t __uid;
-
- ! uid_t
- ! getuid()
- {
- ! return __mint ? Pgetuid() : __uid;
- }
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/lib.h,v
- retrieving revision 1.12
- diff -c -r1.12 lib.h
- *** 1.12 1994/02/02 19:02:08
- --- lib.h 1994/03/17 21:24:07
- ***************
- *** 48,53 ****
- --- 48,54 ----
- #ifdef __MINT__
- __EXTERN int _scanf __PROTO((FILE *, int (*)(FILE *),
- int (*)(int, FILE *), const char *, __VA_LIST__));
- + __EXTERN int _enoent __PROTO((char *));
- #endif
-
- __EXTERN long get_sysvar __PROTO((void *var));
- ***************
- *** 115,118 ****
- --- 116,131 ----
- #define FH_ISATTY 1
- #define FH_ISAFILE 2
-
- + /*
- + * macro for converting a long in DOS format to one in Unix format. "x"
- + * _must_ be an lvalue!
- + */
- + #define __UNIXTIME(x) (x = _unixtime( ((short *)&x)[0], ((short *)&x)[1] ))
- +
- + __EXTERN int _do_lock __PROTO((int fd, int cmd, long size, int whence));
- +
- + #ifdef _STDIO_H
- + __EXTERN FILE *_fopen_i __PROTO((const char *, const char *, FILE *));
- + #endif
- +
- #endif /* _LIB_H */
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/libgcc2.c,v
- retrieving revision 1.2
- diff -c -r1.2 libgcc2.c
- *** 1.2 1994/02/02 19:02:10
- --- libgcc2.c 1994/02/23 22:26:26
- ***************
- *** 60,66 ****
- #include <stddef.h>
- #endif
-
- ! #if 0
- /* Define for XFmode extended real floating point support. */
- #define LONG_DOUBLE_TYPE_SIZE 96
- #else
- --- 60,66 ----
- #include <stddef.h>
- #endif
-
- ! #if defined(XFLOAT_ENABLE) && (__GNUC__ > 2 || __GNUC_MINOR__ >= 4)
- /* Define for XFmode extended real floating point support. */
- #define LONG_DOUBLE_TYPE_SIZE 96
- #else
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/longlong.h,v
- retrieving revision 1.2
- diff -c -r1.2 longlong.h
- *** 1.2 1994/02/02 19:02:12
- --- longlong.h 1994/02/23 22:25:24
- ***************
- *** 411,444 ****
- : "=d" ((USItype)(count)) \
- : "od" ((USItype)(x)), "n" (0))
- #else /* not mc68020 */
- - /* %/ inserts REGISTER_PREFIX. */
- #define umul_ppmm(xh, xl, a, b) \
- __asm__ ("| Inlined umul_ppmm
- ! movel %2,%/d0
- ! movel %3,%/d1
- ! movel %/d0,%/d2
- ! swap %/d0
- ! movel %/d1,%/d3
- ! swap %/d1
- ! movew %/d2,%/d4
- ! mulu %/d3,%/d4
- ! mulu %/d1,%/d2
- ! mulu %/d0,%/d3
- ! mulu %/d0,%/d1
- ! movel %/d4,%/d0
- ! eorw %/d0,%/d0
- ! swap %/d0
- ! addl %/d0,%/d2
- ! addl %/d3,%/d2
- jcc 1f
- ! addl #65536,%/d1
- ! 1: swap %/d2
- ! moveq #0,%/d0
- ! movew %/d2,%/d0
- ! movew %/d4,%/d2
- ! movel %/d2,%1
- ! addl %/d1,%/d0
- ! movel %/d0,%0" \
- : "=g" ((USItype)(xh)), \
- "=g" ((USItype)(xl)) \
- : "g" ((USItype)(a)), \
- --- 411,443 ----
- : "=d" ((USItype)(count)) \
- : "od" ((USItype)(x)), "n" (0))
- #else /* not mc68020 */
- #define umul_ppmm(xh, xl, a, b) \
- __asm__ ("| Inlined umul_ppmm
- ! movel %2,d0
- ! movel %3,d1
- ! movel d0,d2
- ! swap d0
- ! movel d1,d3
- ! swap d1
- ! movew d2,d4
- ! mulu d3,d4
- ! mulu d1,d2
- ! mulu d0,d3
- ! mulu d0,d1
- ! movel d4,d0
- ! eorw d0,d0
- ! swap d0
- ! addl d0,d2
- ! addl d3,d2
- jcc 1f
- ! addl #65536,d1
- ! 1: swap d2
- ! moveq #0,d0
- ! movew d2,d0
- ! movew d4,d2
- ! movel d2,%1
- ! addl d1,d0
- ! movel d0,%0" \
- : "=g" ((USItype)(xh)), \
- "=g" ((USItype)(xl)) \
- : "g" ((USItype)(a)), \
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/regexp.c,v
- retrieving revision 1.8
- diff -c -r1.8 regexp.c
- *** 1.8 1993/07/10 16:36:59
- --- regexp.c 1994/03/17 21:24:08
- ***************
- *** 591,596 ****
- --- 591,597 ----
-
- place = opnd; /* Op node, where operand used to be. */
- *place++ = op;
- + *place++ = '\0';
- *place = '\0';
- }
-
-